package com.tjc.spring.core;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class GenericBeanDefinition implements BeanDefinition {
    private String beanId;
    private String className;
    private Class<?> clazz;

    private List<Property> propertys = new ArrayList<>();

    public GenericBeanDefinition(String beanId, String className, Class<?> clazz) {
        this.beanId = beanId;
        this.className = className;
        this.clazz = clazz;
    }

    ConstructArgument constructArgument = new ConstructArgument();

    public String getID() {
        return beanId;
    }

    public String getClassName() {
        return className;
    }

    public List<Property> getPropertys() {
        return Collections.unmodifiableList(propertys);
    }

    public void addProperty(Property property) {
        propertys.add(property);
    }

    public Class<?> getClazz() {
        return clazz;
    }

    public ConstructArgument getConstructArgument() {
        return constructArgument;
    }

    public void setConstructArgument(ConstructArgument constructArgument) {
        this.constructArgument = constructArgument;
    }
}

